package com.atguigu.day12.abstract02.a3;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/13 11:43
 * @注释
 */
public class JunitTest {
    Graphic[] g;

    @Before
    public void before(){
        Rectangle r = new Rectangle(3, 6);
        Triangle t = new Triangle(3, 4, 5);
        Circle c = new Circle(2);


        g = new Graphic[]{r, t, c};
    }

    @Test
    public void test(){
        for (Graphic graphic : g) {
            System.out.println(graphic);
        }
    }

    @After
    public void after(){
        System.out.println("遍历结束");
    }
}
